package com.yuyou.tas.admin.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.yuyou.tas.admin.mapper.AuthUserRoleRelationMapper;
import com.yuyou.tas.admin.service.IAuthUserRoleRelationService;
import com.yuyou.tas.service.api.admin.entity.AuthUserRoleRelation;

/**
 * Created by yujin.liu on 2018/2/25.
 */
@Service
public class AuthUserRoleRelationServiceImpl implements IAuthUserRoleRelationService{

    @Autowired
    private AuthUserRoleRelationMapper authUserRoleRelationMapper;


    @Override
    public int deleteByUserId(Long userId) {
        return authUserRoleRelationMapper.deleteByUserId(userId);
    }

    @Override
    public int insertAuthUserRoleRelation(AuthUserRoleRelation authUserRoleRelation) {
        return authUserRoleRelationMapper.insert(authUserRoleRelation);
    }

	@Override
	public int deleteByUserRole(Long userId, int roleId) {
		return authUserRoleRelationMapper.deleteByUserRole(userId, roleId);
	}

	@Override
	public List<AuthUserRoleRelation> findByRole7Organ(List<Long> roleIds,
			long authOrganizationId) {
		return authUserRoleRelationMapper.findByRole7Organ(roleIds, authOrganizationId);
	}

	@Override
	public int delByIds(List<Long> ids) {
		return authUserRoleRelationMapper.delByIds(ids);
	}


}
